<script src="../Script/jquery_facebook.alert.js" type="text/javascript"></script>

<script type="text/javascript">
			
$(document).ready( function() 
{
	$("#delete_confirm").click( function() 
	{			
		jConfirm('Are you sure you want to delete this?', 'Confirmation Dialog', 				
		function(r) 
		{
			if(r==true)
			{							
				$.ajax({
							type: 'POST',
							url: '/Offer/DeleteOffer',
							data:"offerID="+$("#offerIDDelete").val(),
							//success: alert('sdabsb'),								 
						});
				$('#delete_confirm').fadeOut();
				$('#DetailDiv').fadeOut();
			}
		});
	});
});
			
</script>
<div id="fb-root"></div>
<script>
	(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
</script>
<?php require_once SYSTEM . '/HTMLHelper.php';?>
     <script src="../../Script/GoogleMap.js" type="text/javascript"></script>
     <script src="../../Script/share.js" type="text/javascript"></script>
     <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBZhHijBhSGHkUXajCN43aWoHeXDQWs8-c&sensor=false"></script>
<!--begin congtent -->
<div class="content">
    <!--begin offer-left-->
    <div class="offer-left">
        <div id="request_menu_2" class="offer-left-caption" onclick="divMenuOnclick('request_menu','2');">
            <div style="float: left; padding-left: 5px;">
                <a href="#" style="font-size: 14px; color: #5b8aff; font-weight: bold; text-decoration: none;">Top Category</a>
            </div>
        </div>
        <div id="request_menu_sub_2" class="offer-left-menu" style="display: block;">
            <?php foreach($this->ViewData['listCat'] as $cat) { ?>
		    	<div class="offer-left-menu-cell">
		        	<a style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;" href="/Offer/ListOffer?category=<?php echo $cat['_id'] ?>"><?php echo $cat['Name']; ?></a>
		        </div>
		    <?php } ?>
        </div>

        <div id="request_menu_3" class="offer-left-caption" onclick="divMenuOnclick('request_menu','3');">
            <div style="float: left; padding-left: 5px;">
                <a href="#" style="font-size: 14px; color: #5b8aff; font-weight: bold; text-decoration: none;">Top Location</a>
            </div>
        </div>
        <div id="request_menu_sub_3" class="offer-left-menu" style="display: block;">
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div>   
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div> 
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div> 
        </div>
    </div>
    <!--end offer-left-->
    
    
    <!--begin offer-right-->
    <div class="offer-right">
        <div class="offer-right-caption" style="margin-top: 10px">
            <div style="float: left; padding-left: 10px; width: 480px; padding: 5px;">
                <label style="font-size: 14px; color: #5b8aff; font-weight: bold">Create New Offer</label>
            </div>
            <div id="show-map" style="float: left; width: 100px;">
                <div style="float: left; padding: 3px 0;">
                    <img id="imgShowCloseMap" alt="/" src="../Content/Image/migiv2/show-map.png" />
                </div>
                <div style="float: left; padding:return $model; 5px 2px;">
                    <label id="btShowMap" style="cursor: pointer; font-size: 12px; color: #5b8aff; font-weight: bold;text-decoration: none;">Show Map</label>
                </div>
            </div>
        </div>
        <div class="offer-right-list-offer">
            <div id="OfferCreating" class="CreatingForm">
            
            
       <div id="map_detail" style="display: none;height:400px;width:100%"></div>
        <div class="offer-detail-popup" id="DetailDiv">
            
            <div class="offer-detail-popup-name">
                <span id="txtDetailName"><?php echo $this->Model['result']->Name; ?></span>
            </div>

            <div class="offer-detail-popup-cell">
                <div style="float: left; padding: 0 5px; width: 120px;">
                    <img id="imgDetailImage" alt="Default" height="120px" width="120px" src="/Upload/Offer/<?php echo $this->Model['result']->Image; ?>" />
                </div>
                <div style="float: left; width: 200px; height: 20px;">
                    <div style="float: left; padding: 1px 0;">
                        <img alt="/" src="../Content/Image/migiv2/location.png" />
                    </div>
                    <div style="float: left; padding: 3px 5px; font-style: italic; font-size: 12px;">
                        Information
                    </div>
                </div>
                <div style="float: left; width: 571px; border: 1px dashed #105da8; padding: 5px 10px;
                    min-height: 60px; color: #000000; background-color: #ffffff;">
                    <p id="txtDetailOwner"><label>Owner: </label><?php echo $this->Model['result']->OwnerName; ?></p>
                    <p id="txtDetailLocation"><label>Location: </label><?php echo $this->Model['result']->Location; ?></p>
                    <input type="hidden" id="hdDetailLocation" value="" />
                    <p id="txtDetailCategory"><label>Category: </label><?php echo $this->Model['result']->Category; ?></p>
                    <p id="txtDetailCreateDate"><label>Create Date: </label>1/3/2011</p>
                </div>
                <div style="float: left; width: 180px; padding: 0 10px; padding-top: 5px; min-height: 25px;">
                    <div style="float: left; width: 120px;">
                        <input id="btFindMap" class="btDetectLocation" style="width: 94px" type="button" value="Find Location"/>
                        <input type="hidden" value="<?php echo $this->Model['result']->Location; ?>" id="add"/>
                        <input type="hidden" value="<?php echo $this->Model['result']->Name; ?>" id="gname"/>
                        <input type="hidden" value="<?php echo $this->Model['result']->Image; ?>" id="gimage"/>
                        <input type="hidden" value="<?php echo $this->Model['result']->ID; ?>" id="gid"/>
                        <input type="hidden" value="<?php echo $this->Model['result']->Description; ?>" id="gdescription"/>
                    </div>
                    <div style="float: left; padding: 0 2px;">
                        <img style="cursor: pointer;" class="btShareFacebook" alt="/" src="../Content/Image/migiv2/facebook.png" />
                    </div>
                    <div style="float: left; padding: 0 2px;">
                        <img style="cursor: pointer;" class="btShareTwister" alt="/" src="../Content/Image/migiv2/twitter.png" />
                    </div>
                </div>
            </div>
           
            <div class="offer-detail-popup-cell">
                <div style="float: left; width: 330px; height: 20px;">
                    <div style="float: left; padding: 1px 0;">
                        <img alt="/" src="../Content/Image/migiv2/description.png" />
                    </div>
                    <div style="float: left; padding: 2px 5px; font-style: italic; font-size: 12px;">
                        Description
                    </div>
                </div>
                <div style="float: left; width: 730px; border: 1px dashed #105da8; padding: 5px 0;
                    height: 548px; color: #000000; background-color: #ffffff; overflow: auto">
                    <span id="txtDetailDescription"><?php echo $this->Model['result']->Description; ?></span>
                </div>
            </div>
             <div class="offer-detail-popup-cell" style="padding-bottom: 10px;" id="DetailButtonPanel">
                
                 <form action ="/Offer/EditOffer" method ="POST">
                       <input type="hidden" name="offerID" value="<?php echo $this->Model['result']->ID; ?>"/>
                       <input id="btRequest" type="submit" style="float: right; margin-right: 10px;" value="Edit" name="submit" class="ButtonRequest" />                                                                                    
               </form>
              
                <input type="hidden" id="offerIDDelete" value="<?php echo $this->Model['result']->ID; ?>"/>
                <input id="delete_confirm" type="button" style="float: right; margin-right: 10px;" value="delete" name="submit" class="ButtonRequest" />                                                                                    
              
            </div>  
          	<div class="fb-like" data-href="http://localhost/Offer/OfferDetail?offerID=<?php echo $this->Model['result']->ID;?>" data-send="true" data-width="450" data-show-faces="true">
          	</div>                                            
        </div> 
                                         
    </div>	               
        </div>
    </div>
    <div style="background-color: #5a8aff; height: 20px; width: 960px; float: left;"></div>
</div>
